import 'receipt.dart';

class TransactionResponse {
  final String status;
  final String message;
  final String timestamp;
  final bool finalAck;
  final Map<int, List<int>> fields;
  final ReceiptModel? receipt;

  TransactionResponse({
    required this.status,
    required this.message,
    required this.timestamp,
    required this.finalAck,
    required this.fields,
    this.receipt,
  });

  Map<String, dynamic> toJson() => {
    'status': status,
    'message': message,
    'timestamp': timestamp,
    'finalAck': finalAck,
    'fields': fields.map((k, v) => MapEntry(k.toString(), v)),
    'receipt': receipt?.toJson(),
  };
} 